import request from "@/utils/request";

// 查询销售额列表
export function listRevenue(query) {
  return request({
    url: "/sale/revenue/list",
    method: "get",
    params: query
  });
}

// 查询销售额详细
export function getRevenue(id) {
  return request({
    url: "/sale/revenue/" + id,
    method: "get"
  });
}

// 新增销售额
export function addRevenue(data) {
  return request({
    url: "/sale/revenue",
    method: "post",
    data: data
  });
}

// 修改销售额
export function updateRevenue(data) {
  return request({
    url: "/sale/revenue",
    method: "put",
    data: data
  });
}

// 删除销售额
export function delRevenue(id) {
  return request({
    url: "/sale/revenue/" + id,
    method: "post"
  });
}
